#ifndef TCP_INTERFACE_H
#define TCP_INTERFACE_H
#ifdef __cplusplus
extern "C"{
#endif
#define TRANSACTION_TYPE_ACK 0
#define TRANSACTION_TYPE_G_CODE 1
#define TRANSACTION_TYPE_CONTROL_MAINSHARFT_SPEED 2
#define TRANSACTION_TYPE_CONTROL_MAINSHARFT_SWITCH 3
#define TRANSACTION_TYPE_CONTROL_COOLING_SWITCH  4
#define TRANSACTION_TYPE_CONTROL_FEED_SPEED 5
#define TRANSACTION_TYPE_CONTROL_FEED_RATE 6
#define TRANSACTION_TYPE_COORDIC 7
extern char tcp_recv_buf[];
extern char tcp_send_buf[];
struct TransactionPacket
{
    unsigned char lenght;
    unsigned char type;
    char data[];
};
#ifdef __cplusplus
}
#endif
#define CONVER_PACKET(x) reinterpret_cast<struct TransactionPacket*>(x)
#endif
